In many computing environments there is a need to schedule periodic events having varying rates. For instance, the periodic event may be data collection for the purpose of data transfer or histogramming, or data sampling. Fast and efficient scheduling is particularly important where the data provides information about an ongoing automated industrial process for the purpose of controlling that industrial process. In this respect, the data may provide information relating to temperature, pressure, flow rate, torque, or electrical current, and based upon this information the condition of switches or valves may be changed. In many cases, the data may require updating at a very high rate (e.g., every 2 to 100 milliseconds) in order to provide timely information regarding the industrial process. A high-speed, high-performance network (e.g., ControlNet.TM. available from Allen-Bradley Company, Inc.) is often used to link together such devices as controllers, machine tools, workstations, I/O devices, man-machine interfaces (MMI) and other computing systems used for industrial automation. The network facilitates the transfer of data between devices. More specifically, the network provides fast, deterministic scheduled data transfers for control purposes and unscheduled non-time critical messages for configuration and housekeeping on the network.
On a typical network, a user-defined time interval is established for transmission of scheduled data. This time interval will be referred to as the Periodic Interval Time (PIT). This time interval is also known as the Network Update Time (NUT). The PIT is defined as the time interval between transmissions from each node (i.e., physical device) connected to the network. Accordingly, scheduled data is transmitted during each PIT.
It should be appreciated that the scheduled data provides a variety of different types of information regarding the industrial process, and as a result, there are often variations in how often a particular data item must be updated. Accordingly, some data items need to be transferred during each and every PIT, while other data items need only be transferred every other PIT. Still other data items need only be transferred every fourth PIT, or less frequently. The less often a data item is transferred, the slower the update rate.
The number of PITs occurring for an update of a particular data item is referred to as the pit-repeat-period or PRP. For the purpose of illustrating a preferred embodiment of the present invention, the PRP will be a power of two (e.g., 1, 2, 4, 6, 8, 16, 32, 64, or 128). However, it should be appreciated that other PRP values are also possible. A data item that is transferred every PIT will have a PRP of 1, while a data item that is transferred every fourth PIT will have a PRP of 4. The maximum PRP is known as a "macrocycle." Accordingly, the term "macrocycle" will refer to a set of PITs equal in number to the largest PRP. Data items having the maximum PRP will be updated at the slowest rate of any of the data items.
FIG. 1 shows a Table 10, which illustrates the scheduling of data items for transfer at each PIT. The data items are listed under the PIT number during which they are transferred. The data items are represented by a two-digit label where the first digit represents the PRP, indicating how often the data item is transferred. The larger the first digit, the less frequently the data item is transferred. The second digit represents the "first PIT" in a macrocycle during which the data item is transferred. Moreover, the second digit also represents the PIT number of the data item's respective PRP, during which the data item is transferred.
Data items labelled as 1.0 are transferred on every PIT of the macrocycle, and thus have a PRP of 1. Data items which need only be transferred every second PIT are labelled as 2.0 and 2.1. Likewise, data items which need only be transferred every fourth PIT are labelled as 4.0, 4.1, 4.2, and 4.3. All of the data items listed under the same PIT NO. are transferred during the same PIT. Therefore, the data items associated with labels 1.0, 2.0, 4.0, 8.0 and 16.0 are all required to be transferred during PIT NO. 0. Likewise, the data items associated with labels 1.0, 2.1, 4.1, 8.1 and 16.1 are all required to be transferred during PIT NO. 1, and so on. Moreover, data items labelled 1.0, 2.0, 4.0, 8.0, 16.0 are first transferred during PIT NO. 0, while data items labelled 2.1, 4.1, 8.1, 16.1 are first transferred during PIT NO. 1.
Prior art methods for scheduling data items for transfer required the use of a 2-dimensional array, such as the 2-dimensional array 20 shown in FIG. 2. It should be noted that only a portion of the 2-dimensional array is shown. The X-dimension of the array is established by the length of the macrocycle (i.e., the data items with the largest PRP.) Accordingly, if the largest PRP is 128, the X-dimension of the array must accommodate 128 PITs (i.e., PIT NO. 0 thru PIT NO. 127). The Y-dimension of the array will vary depending upon how many data items must be transferred during a respective PIT.
It should be appreciated that memory available for array 20 is often limited. Therefore, if array 20 is limited to, for example, a 6K byte block of memory, array 20 will have dimensions of 128 by 3, where there are 128 PITs, or dimensions of 16 by 24, where there are 16 PITs. By limiting the amount of available memory, the number of data items which can be transferred during a single PIT will also be limited, particularly when the macrocycle is very large (e.g., 128). Therefore, memory limitations impair the use of large macrocycles. Accordingly, there is a trade-off between the length of the macrocycle and the number of data items which can be transferred during each PIT.
The use of array 20 to schedule the data items to be transferred during each PIT has other drawbacks. In this respect, array 20 makes inefficient use of available memory. The same data item will take up multiple memory locations as it is repeatedly transferred during several different PITs. Accordingly, there are many entries in array 20 for the same data item. For example, the data item labelled 1.0 is duplicated for each and every PIT. Moreover, it is difficult to make use of memory locations in array 20 where the data item has been deleted. For example, data items have been deleted from PIT NOS. 1, 3 and 5, as indicated by the designation "DEL." While labels for data items can be moved to open memory locations where deletions have occurred, it requires that collection of data for a data transfer must be temporarily stopped. As a result, housekeeping functions for array 20 can slow data collection.
The present invention overcomes these and other drawbacks of prior art systems for scheduling periodic events having varying rates to provide a system which is faster, more efficient and reduces the amount of memory needed.